package com.yincb;

import com.yincb.entity.Account;
import com.yincb.entity.mapper.AccountMapper;
import com.yincb.entity.mapper.UserMapper;
import com.yincb.service.AccountService;
import com.yincb.service.UAService;
import com.yincb.service.UserService;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import javax.annotation.Resource;
import java.util.List;

@SpringBootTest
class DatasourceDemo {


    @Resource
    private UserMapper userMapper;

    @Resource
    private AccountMapper accountMapper;

    @Resource
    private AccountService accountService;

    @Resource
    private UAService uaService;

    @Resource
    private UserService userService;


    @Test
    void add(){
        uaService.add();
    }

    @Test
    void tes1() {

//        List<User> users = userMapper.selectList(null);
        List<Account> select = accountService.select();
        System.out.println(select);

    }

    @Test
    void test2(){
        List<Account> accounts = accountMapper.selectList(null);
        System.out.println(accounts);
    }

    @Test
    void test3(){

        uaService.query();

    }

}
